package task5_11;

import com.sun.deploy.net.protocol.javascript.Handler;
import com.sun.org.apache.xpath.internal.axes.HasPositionalPredChecker;
import java.util.HashMap;
import java.util.Iterator;
import task5_8.Student;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/27 8:37
 * @description:
 */
public class Task5_11 {

  public static void main(String[] args) {
    HashMap<String,Student>stringHashMap= new HashMap<String,Student>();
    Student a1=new Student("张三",18);
    Student a2=new Student("王五",19);
    Student a3=new Student("里斯",20);
     stringHashMap.put("第一",a1);
     stringHashMap.put("第二",a2);
     stringHashMap.put("第三",a3);
    Iterator iterator=stringHashMap.keySet().iterator();
    while (iterator.hasNext()){
      String key=(String) iterator.next();
      Student value=stringHashMap.get(key);
      System.out.println(key+"\t"+value);
    }



  }

}
